package com.crm.pojo;

import java.io.Serializable;
import javax.persistence.*;

import com.alibaba.fastjson.annotation.JSONField;

import java.math.BigDecimal;
import java.util.Date;


/**
 * The persistent class for the C_O_DETAILS database table.
 * 
 */
@Entity
@Table(name="C_O_DETAILS")
@NamedQuery(name="CODetail.findAll", query="SELECT c FROM CODetail c")
public class CODetail implements Serializable {
	private static final long serialVersionUID = 1L;

	@Id
	@SequenceGenerator(initialValue = 1, allocationSize = 1,name="C_O_DETAILS_COID_GENERATOR", sequenceName="SEQ1")
	@GeneratedValue(strategy=GenerationType.SEQUENCE, generator="C_O_DETAILS_COID_GENERATOR")
	@Column(name="C_O_ID")
	private Long cOId;

	@Column(name="C_O_AMOUNT")
	private BigDecimal cOAmount;

	@Column(name="C_O_COMPLETE_ACCOUNT")
	private BigDecimal cOCompleteAccount;

	@Column(name="C_O_COST_PRICE")
	private BigDecimal cOCostPrice;

	@Column(name="C_O_DETAILS_IS_DEL")
	private String cODetailsIsDel;

	@Column(name="C_O_MONEY")
	private BigDecimal cOMoney;

	@Column(name="C_O_PRICE")
	private BigDecimal cOPrice;

	@Column(name="C_O_PRODUCT_ID")
	private BigDecimal cOProductId;

	@Column(name="C_O_REMARK")
	private String cORemark;

	@Column(name="C_O_STATE")
	private String cOState;

	@Temporal(TemporalType.DATE)
	@Column(name="C_O_TIME")
	@JSONField(format="yyyy-MM-dd")
	private Date cOTime;

	@Column(name="FK_ORDER_ID")
	private BigDecimal fkOrderId;

	@Column(name="PRODUCT_TYPE")
	private String productType;

	//bi-directional many-to-one association to Contract
	@ManyToOne
	@JoinColumn(name="CONTRACT_ID")
	private Contract contract;

	public CODetail() {
	}

	public Long getCOId() {
		return this.cOId;
	}

	public void setCOId(Long cOId) {
		this.cOId = cOId;
	}

	public BigDecimal getCOAmount() {
		return this.cOAmount;
	}

	public void setCOAmount(BigDecimal cOAmount) {
		this.cOAmount = cOAmount;
	}

	public BigDecimal getCOCompleteAccount() {
		return this.cOCompleteAccount;
	}

	public void setCOCompleteAccount(BigDecimal cOCompleteAccount) {
		this.cOCompleteAccount = cOCompleteAccount;
	}

	public BigDecimal getCOCostPrice() {
		return this.cOCostPrice;
	}

	public void setCOCostPrice(BigDecimal cOCostPrice) {
		this.cOCostPrice = cOCostPrice;
	}

	public String getCODetailsIsDel() {
		return this.cODetailsIsDel;
	}

	public void setCODetailsIsDel(String cODetailsIsDel) {
		this.cODetailsIsDel = cODetailsIsDel;
	}

	public BigDecimal getCOMoney() {
		return this.cOMoney;
	}

	public void setCOMoney(BigDecimal cOMoney) {
		this.cOMoney = cOMoney;
	}

	public BigDecimal getCOPrice() {
		return this.cOPrice;
	}

	public void setCOPrice(BigDecimal cOPrice) {
		this.cOPrice = cOPrice;
	}

	public BigDecimal getCOProductId() {
		return this.cOProductId;
	}

	public void setCOProductId(BigDecimal cOProductId) {
		this.cOProductId = cOProductId;
	}

	public String getCORemark() {
		return this.cORemark;
	}

	public void setCORemark(String cORemark) {
		this.cORemark = cORemark;
	}

	public String getCOState() {
		return this.cOState;
	}

	public void setCOState(String cOState) {
		this.cOState = cOState;
	}

	public Date getCOTime() {
		return this.cOTime;
	}

	public void setCOTime(Date cOTime) {
		this.cOTime = cOTime;
	}

	public BigDecimal getFkOrderId() {
		return this.fkOrderId;
	}

	public void setFkOrderId(BigDecimal fkOrderId) {
		this.fkOrderId = fkOrderId;
	}

	public String getProductType() {
		return this.productType;
	}

	public void setProductType(String productType) {
		this.productType = productType;
	}

	public Contract getContract() {
		return this.contract;
	}

	public void setContract(Contract contract) {
		this.contract = contract;
	}

	@Override
	public String toString() {
		return "CODetail{" +
				"cOId=" + cOId +
				", cOAmount=" + cOAmount +
				", cOCompleteAccount=" + cOCompleteAccount +
				", cOCostPrice=" + cOCostPrice +
				", cODetailsIsDel='" + cODetailsIsDel + '\'' +
				", cOMoney=" + cOMoney +
				", cOPrice=" + cOPrice +
				", cOProductId=" + cOProductId +
				", cORemark='" + cORemark + '\'' +
				", cOState='" + cOState + '\'' +
				", cOTime=" + cOTime +
				", fkOrderId=" + fkOrderId +
				", productType='" + productType + '\'' +
				", contract=" + contract +
				'}';
	}
}